<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>PVREngine 0.2a </h1>
<p>
<h2><a class="anchor" name="_overview_">
Overview</a></h2>
The PVREngine is a collection of classes provided by Imagination Technologies to aid in the development of 3D rendering applications. It builds upon PVRShell and PVRTools to allow further abstraction of API and OS, tries to handle common rendering functions and provides a framework upon which to build 3D applications. It is also an example of how such code can be put together for these purposes.<p>
The PODPlayer application source, this document and the comments in the engine code are provided to help in understanding the workings of the PVREngine.<h2><a class="anchor" name="_using_">
Using the PVREngine</a></h2>
Steps to use the PVREngine in your project:<p>
<ul>
<li>Include this file in your source <pre class="fragment"><div><span class="preprocessor">#include "<a class="code" href="PVREngine_8h.html">PVREngine.h</a>"</span>
</div></pre></li></ul>
<p>
<ul>
<li>Inherit from the PVREngine class. <pre class="fragment"><div><span class="keyword">class </span>MyApplication: <span class="keyword">public</span> pvrengine::PVREngine
{
<span class="keyword">public</span>:
    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> InitApplication();
    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> InitView();
    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ReleaseView();
    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> QuitApplication();
    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> RenderScene();
};
</div></pre></li></ul>
<p>
<ul>
<li>As the PVREngine class inherits from PVRShell the user also needs to register his application class through the NewDemo function: <pre class="fragment"><div>PVRShell* NewDemo()
{
    <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classMyApplication.html">MyApplication</a>();
}
</div></pre></li></ul>
<p>
<ul>
<li>Specify the API for a particular build of your project by defining BUILD_*APINAME* for the preprocessor where *APINAME* is OGL,OGLES2 etc.</li></ul>
<p>
<ul>
<li>Define the correct include paths for your chosen API and link against the correct library files: the PVREngine .lib and the PVRTools .lib for your target API and OS.</li></ul>
<p>
<ul>
<li>Note that all classes and structs in the PVREngine occupy the pvrengine namespace.</li></ul>
<p>
For more information on PVRShell please examine its documentation also included in the Imagination Technologies SDK.<h2><a class="anchor" name="_rendering_">
PVREngine Rendering</a></h2>
The PVREngine seeks to enable the efficient rendering of 3D geometry using POD files as the principle source of this.<h3><a class="anchor" name="_uniformhandler_">
pvrengine::UniformHandler</a></h3>
The uniform handler is a class allowing the engine to keep track of essential values such as the transformation matrices and position of lights. This class handles the efficient calculation and binding of the attributes and uniforms required by any shaders in use. Values that need only be calculated once per frame are done so only once.<p>
As it holds the information required to render the actual view, facility is provided here for culling geometry invisible to the camera.<h3><a class="anchor" name="_mesh_">
Mesh</a></h3>
Individual meshes are drawn separately using their assigned materials allowing gross culling to be performed on them or whatever selective rendering is required. This is encapsulated in the <a class="el" href="classpvrengine_1_1Mesh.html">pvrengine::Mesh</a> class.<h3><a class="anchor" name="_material_">
Material</a></h3>
<a class="el" href="classpvrengine_1_1Material.html">pvrengine::Material</a> objects are used to abstract the effects and textures used for an individual mesh so that duplication of shader compilation and other material data is avoided. At initialisation shader uniforms and attributes required for rendering each type of material are collated, textures are loaded and initialised and shaders compiled.<h3><a class="anchor" name="_managers_">
Managers</a></h3>
Classes: <b><a class="el" href="classpvrengine_1_1MaterialManager.html">pvrengine::MaterialManager</a></b>, <b><a class="el" href="classpvrengine_1_1LightManager.html">pvrengine::LightManager</a></b>, <b><a class="el" href="classpvrengine_1_1MeshManager.html">pvrengine::MeshManager</a></b>, <b><a class="el" href="classpvrengine_1_1TextureManager.html">pvrengine::TextureManager</a></b> <b><a class="el" href="classpvrengine_1_1ContextManager.html">pvrengine::ContextManager</a></b> are provided to avoid duplication of and easy disposal of resources at program exit. For instance:<p>
<ul>
<li>All meshes that are to be rendered using the same shaders or textures will share a single material.</li><li>All materials that use the same texture will share this texture - it won't be loaded more than once.</li></ul>
<h2><a class="anchor" name="_utility_">
Utility Classes</a></h2>
<h3><a class="anchor" name="_console_">
ConsoleLog</a></h3>
The <a class="el" href="classpvrengine_1_1ConsoleLog.html">pvrengine::ConsoleLog</a> class provides a place to store text output from your application. It can be set to log to file constantly or when the write function is called. This is a CPVRTSingleton class and so output may be logged with a single line:<p>
<pre class="fragment"><div>pvrengine::ConsoleLog::inst().log(<span class="stringliteral">"This line is added to the log\n"</span>);
</div></pre><h3><a class="anchor" name="_options_">
OptionsMenu</a></h3>
<a class="el" href="classpvrengine_1_1OptionsMenu.html">pvrengine::OptionsMenu</a> provides a user interface to change settings that can be set up by the client application to the engine. Simply instantiate some <a class="el" href="classpvrengine_1_1Option.html">pvrengine::Option</a> objects, add them to an OptionsMenu object, tell it to render and query the OptionsMenu for feedback.<h3><a class="anchor" name="_time_">
TimeController</a></h3>
The <a class="el" href="classpvrengine_1_1TimeController.html">pvrengine::TimeController</a> deals with delta time calculations so that applications can be frame rate independent. Also does frames per second calculations and POD animation timing. This is a CPVRTSingleton.<h3><a class="anchor" name="_camera_">
SimpleCamera</a></h3>
<a class="el" href="classpvrengine_1_1SimpleCamera.html">pvrengine::SimpleCamera</a> is an elevation and heading camera class provided to help with visualisation and navigation of 3D scenes.<h2><a class="anchor" name="_datastructure_">
Data and Mathematical Structures</a></h2>
<ul>
<li><a class="el" href="classdynamicArray.html">dynamicArray</a> is an expanding array template used to simplify the acquisition and disposal of memory as required by the engine.</li></ul>
<p>
<ul>
<li><a class="el" href="structpvrengine_1_1Plane.html">pvrengine::Plane</a> defines an infinite surface in 3D space</li><li><a class="el" href="structpvrengine_1_1BoundingBox.html">pvrengine::BoundingBox</a> defines 8 points enclosing a volume in 3D space</li><li><a class="el" href="structpvrengine_1_1BoundingHex.html">pvrengine::BoundingHex</a> defines 6 planes enclosing a volume in 3D space </li></ul>
<br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
